// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   change_ok.java

package oa.messager;

import include.nseer_db.nseer_db_backup1;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.servlet.jsp.JspFactory;

public class change_ok extends HttpServlet
{

	public change_ok()
	{
	}

	public synchronized void service(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException
	{
		HttpSession dbSession = request.getSession();
		JspFactory _jspxFactory = JspFactory.getDefaultFactory();
		javax.servlet.jsp.PageContext pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
		ServletContext dbApplication = dbSession.getServletContext();
		try
		{
			HttpSession session = request.getSession();
			ServletContext context = session.getServletContext();
			String path = context.getRealPath("/");
			nseer_db_backup1 oa_db = new nseer_db_backup1(dbApplication);
			if (oa_db.conn((String)dbSession.getAttribute("unit_db_name")))
			{
				String changer = request.getParameter("changer");
				String changer_ID = request.getParameter("changer_ID");
				String change_time = request.getParameter("change_time");
				String content = request.getParameter("content");
				String messager_type = request.getParameter("messager_type");
				String tool_type = request.getParameter("tool_type");
				String id = request.getParameter("id");
				String sql = (new StringBuilder("update oa_messager set changer='")).append(changer).append("',changer_ID='").append(changer_ID).append("',change_time='").append(change_time).append("',content='").append(content).append("',type='").append(messager_type).append("',tool_type='").append(tool_type).append("' where id='").append(id).append("'").toString();
				oa_db.executeUpdate(sql);
				oa_db.commit();
				oa_db.close();
				response.sendRedirect("oa/messager/change_ok_b.jsp");
			} else
			{
				response.sendRedirect("error_conn.htm");
			}
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}
}
